<template>
	<view>
		<!-- 实现log打印 -->
		<button @click="onLog()">console.log</button>
		<button @click="onDebug()">console.debug</button>
		<button @click="oninfo()">console.info</button>
		<button @click="onwarn()" type="warn">console.warn</button>
		<button @click="onError()" type="warn">console.error</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title:'打印日志',
				name:'kaiwen',
				pwd:'111'
			}
		},
		methods: {
			onLog(){
				// 常规写法
				console.log("onLog()-->"+this.title);
				// clog
				console.log("clog");
				// clogv
				console.log('this.title: ',this.title);
				// ,
				console.log('this.title: '+this.title);
				console.log("",);
			},
			onwarn(){
				if(name === 'kaiwen'){
					console.log("登陆成功");
				}else{
					console.warn("this is warn log");
				}
			},
			onError(){
				console.error("this is error massage");
			},
		}
	}
</script>

<style>
button{
	margin: 30rpx;
}

</style>
